version 10.0
log using "C:\fsu2010\formateur\ajps\submission2\replication\analysis\stata_mxl_robustness.log", replace
#delimit ;
set mem 30m;
clear matrix;
clear mata;

set more off;

*     ***************************************************************** *;
*     ***************************************************************** *;
*       File-Name:  stata_mxl_robustness.do                             *;
*       Date:       November 11, 2010                                   *;
*       Author:     GG/MG                                               *;
*       Purpose:    Robustness tests for AJPS paper                     *;
*       Input File:     europe_all.dta, westeurope2_CMP.dta             *;
*       Output File:    stata_mxl_robustness.log                        *;
*       Data Output:    none                                            *;
*       Previous file:  europe_all.dta, westeurope2_CMP.dta             *;
*       Machine:        Matt's desktop                                  *;
*     ****************************************************************  *;
*     ****************************************************************  *;

*     ****************************************************************  *;
*       What if we dropped cases in Eastern Europe where the party of   *;
*       the incumbent PM is not in the new legislature?                 *;
*     ****************************************************************  *;

use "C:\fsu2010\formateur\ajps\submission2\replication\analysis\europe.dta", clear;

drop if cabinetcode == 2107;
drop if cabinetcode == 2307;
drop if cabinetcode == 2311;
drop if cabinetcode == 2509;
drop if cabinetcode == 2707;

mixlogit choice largestparty_west party_seatshare_west medianparty1_west presidentparty_west previousPM_west previousPM_conflict_west previousPM_gain1_west previous_cabinet_gain1_west,  
    rand (largestparty party_seatshare medianparty1 presidentparty previousPM president_investiture president_direct previousPM_conflict previousPM_gain1 previous_cabinet_gain1) 
    ln(0) nrep(125) group(cabinetcode);

*     ****************************************************************  *;
*       What if we had used all governments in Western Europe?          *;
*     ****************************************************************  *;

use "C:\fsu2010\formateur\ajps\submission2\replication\analysis\europe_all.dta", clear;

*     ****************************************************************  *;
*       Model 1: Western Europe                                         *;
*     ****************************************************************  *;

mixlogit choice largestparty_east party_seatshare_east,  
    rand (largestparty party_seatshare) ln(0) nrep(125) group(cabinetcode); 

*     ****************************************************************  *;
*       Model 2: Western Europe                                         *;
*     ****************************************************************  *;

mixlogit choice largestparty_east party_seatshare_east medianparty1_east,  
    rand (largestparty party_seatshare medianparty1) ln(0) nrep(125) group(cabinetcode); 
    
*     ****************************************************************  *;
*       Model 3: Western Europe                                         *;
*     ****************************************************************  *;

mixlogit choice largestparty_east party_seatshare_east medianparty1_east presidentparty_east,  
    rand (largestparty party_seatshare medianparty1 presidentparty) ln(0) nrep(125) group(cabinetcode);
          
*     ****************************************************************  *;
*       Model 4: Western Europe                                         *;
*     ****************************************************************  *;

mixlogit choice largestparty_east party_seatshare_east medianparty1_east presidentparty_east previousPM_east,  
    rand (largestparty party_seatshare medianparty1 presidentparty previousPM) ln(0) nrep(125) group(cabinetcode);
    
*     ****************************************************************  *;
*       Model 5: Western Europe                                         *;
*     ****************************************************************  *;

mixlogit choice largestparty_east party_seatshare_east medianparty1_east presidentparty_east previousPM_east,   
    rand (largestparty party_seatshare medianparty1 presidentparty previousPM president_investiture president_direct) ln(0) nrep(125) group(cabinetcode);

mixlogit choice largestparty_east party_seatshare_east medianparty1_east presidentparty_east previousPM_east,    
    rand (largestparty party_seatshare medianparty1 presidentparty previousPM president_investiture president_direct) ln(0) nrep(125) group(cabinetcode) 
    from(largestparty_east =-1.403309 party_seatshare_east =0.2506177 medianparty1_east =-1.441322 presidentparty_east =0.9270295 
    previousPM_east =-1.228084 largestparty=1.002409 party_seatshare=0.1165616 medianparty1=1.081568 presidentparty=3.408346 
    previousPM=0.7209862 president_investiture= -2.267492 president_direct= -2.237836);
       
*     ****************************************************************  *;
*       Model 6: Western Europe                                         *;
*     ****************************************************************  *;

mixlogit choice largestparty_east party_seatshare_east medianparty1_east presidentparty_east previousPM_east previousPM_conflict_east previousPM_gain1_east previous_cabinet_gain1_east,  
    rand (largestparty party_seatshare medianparty1 presidentparty previousPM president_investiture president_direct previousPM_conflict previousPM_gain1 previous_cabinet_gain1) 
    ln(0) nrep(125) group(cabinetcode);
    
clear;

*     ****************************************************************  *;
*       What if we had used the CMP data to identify the median party   *;
*       in Western Europe? Let's just look at the West Europe data.     *;
*     ****************************************************************  *;

use "C:\fsu2010\formateur\ajps\submission2\replication\analysis\westeurope2_CMP.dta", clear;
  
*     ****************************************************************  *;
*       Model 2: Western Europe (CMP version)                           *;
*     ****************************************************************  *;

mixlogit choice, rand (largestparty party_seatshare medianparty_CMP) ln(0) nrep(125) group(cabinetcode); 
    
*     ****************************************************************  *;
*       Model 3: Western Europe (CMP version)                           *;
*     ****************************************************************  *;

mixlogit choice, rand (largestparty party_seatshare medianparty_CMP presidentparty) ln(0) nrep(125) group(cabinetcode);
      
*     ****************************************************************  *;
*       Model 4: Western Europe (CMP version)                           *;
*     ****************************************************************  *;

mixlogit choice, rand (largestparty party_seatshare medianparty_CMP presidentparty previousPM) ln(0) nrep(125) group(cabinetcode); 

*     ****************************************************************  *;
*       Model 5: Western Europe (CMP version)                      *;
*     ****************************************************************  *;

mixlogit choice, rand (largestparty party_seatshare medianparty_CMP presidentparty previousPM president_investiture president_direct) ln(0) nrep(125) group(cabinetcode);  
   
*     ****************************************************************  *;
*       Model 6: Western Europe (CMP version)                           *;
*     ****************************************************************  *;

mixlogit choice, rand (largestparty party_seatshare medianparty_CMP presidentparty previousPM president_investiture president_direct previousPM_conflict previousPM_gain1 previous_cabinet_gain1) 
    ln(0) nrep(125) group(cabinetcode);

*     ****************************************************************  *;
*       No evidence that median party has a higher probability of       *;
*       becoming the PM party in W. Europe once we use CMP to identify  *;
*       the median party.                                               *;
*     ****************************************************************  *;

log close;



  


